package com.study.decorator.battercake;

public class Test {
    public static void main(String[] args) {
        BatterCake cake = new BaseBatterCake();
        System.out.println(cake.getName() + ",总价" + cake.getPrice());

        BatterCakeAddEgg addEgg = new BatterCakeAddEgg(cake);
        BatterCakeAddEgg addEgg2 = new BatterCakeAddEgg(addEgg);
        System.out.println(addEgg2.getName() + ",总价" + addEgg2.getPrice());

        BatterCakeAddSausage addSausage = new BatterCakeAddSausage(addEgg2);
        System.out.println(addSausage.getName() + ",总价" + addSausage.getPrice());
    }
}
